package book;

public class E4_1 {
    public static void main(String args[]){



        XiyoujiRenwu sunwukong,zhubajie;
        sunwukong=new XiyoujiRenwu();


        new XiyoujiRenwu();




        sunwukong.height=70;
        sunwukong.weight=90;
        sunwukong.head="small";
        System.out.println("身高："+sunwukong.height);

        zhubajie=sunwukong;

        zhubajie.height=60;

        System.out.println("身高："+sunwukong.height);



        float f=sunwukong.height;

        //sunwukong.fight("扫堂腿");



    }
}

class XiyoujiRenwu{
    float height,weight;
    String head,ear;
     void fight(String s){
        System.out.println(s);
    }

    //初始化对象中的身高和体重这两个变量的
    public XiyoujiRenwu(float shengao,float tizhong){
        System.out.println("构造方法1：初始化对象的身高体重");
         height=shengao;
         weight=tizhong;
    }

    public XiyoujiRenwu(){
        System.out.println("构造方法2：不初始化任何变量");
    }
    public XiyoujiRenwu(String tou,String erduo){
        System.out.println("构造方法3：初始化对象的身高体重");
        head=tou;
        ear=erduo;
    }



}
